package com.ndp.fb.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author infi
 */
@Setter
@Getter
@NoArgsConstructor
public class AdGroupStats extends AdStats implements Serializable {
    /**
     * 描述   (@author: giser.yang)
     */

    private static final long serialVersionUID = 8473772081702277802L;
    public Date dataUpdateTime;
    /**
     * campaignId
     */
    private Long campaignId;
    /**
     * adGroupId
     */
    private Long adGroupId;
    private Long campaignGroupId;
    /**
     * 查询日期
     */
    private String day;
    /**
     * 用来分片用的id
     */
    private String mongodbId;
    /**
     * 本次拉取数据开始时间
     */
    private Long processStartTime;
    /**
     * 本次拉取数据结束时间
     */
    private Long processEndTime;
    /**
     * ********新加入业务字段*********
     */
    private String adGroupName;
    private Long fbConnectionObjectId;
    private String fbConnectionObjectName;
    private String campaignGroupName;
    private String adSetName;
    private String adGroupStatus;
    private String adGroupEffectiveStatus;
    private Long startTime;
    private Long endTime;
    private Double price;
    private Long productConfId;
    private String imageHash;
    private List<String> carouselImageHash;
    private Long adCreativeId;
    private Long videoId;
    private String platform;
    private Long publishBatchId;
    private Integer deleteStatus;

    private Long createTime;
    private String imageMd5;
    private String videoMd5;
    private List<ImageHashVersion> imageHashHistory;

    /**
     * 更新时间
     */
    private Date updateTime;
    private Double ctr;
    private Double cr;

    // V2.4新增
    private String actions;
    private String actionValues;
    private String uniqueActions;
    private Long totalActions;
    private Long totalActionValue;
    private Double frequency;
    private Long deeplinkClicks;
    private Long appStoreClicks;
    private Long websiteClicks;
    private Long reach;
    private Long socialReach;
    private Double uniqueCtr;
    private Double cpc;
    private Double cpm;
    private Double cpp;
    private Double costPerTotalAction;
    private String costPerActionType;
    private String costPerUniqueActionType;
    private Double costPerUniqueClick;
    private String relevanceScore;
    private String websiteCtr;

    private String country;
    private String age;
    private String gender;
    private String placement;
    private String region;
    private String impression_device;
    private String product_id;

    private Integer version;
    private Integer cVersion;
    private String breakdowns;

    // V2.5新增
    private Integer inlineLinkClicks;

    private Double costPerInlineLinkClick;

    private Integer inlinePostEngagement;
    private Double costPerInlinePostEngagement;

    public void init() {
        this.setAccountId(0L);
        this.setActiontype("mobile_app_install");
        this.setAdCreativeId(0L);
        this.setAdGroupId(0L);
        this.setAdGroupName("");
        this.setAdGroupStatus("");
        this.setAdSetName("");
        this.setCampaignGroupId(0L);
        this.setCampaignGroupName("");
        this.setCampaignId(0L);
        this.setClicks(0);
        this.setCost(0.0);
        this.setDay("1970-01-01");
        this.setEndTime(0L);
        this.setFbConnectionObjectId(0L);
        this.setFbConnectionObjectName("");
        this.setImageHash("");
        this.setImpressions(0);
        this.setPlatform("");
        this.setPrice(0.0);
        this.setProcessStartTime(System.currentTimeMillis());
        this.setProcessEndTime(System.currentTimeMillis());
        this.setProductConfId(0L);
        this.setResults(0);
        this.setSocialClicks(0);
        this.setSocialImpressions(0);
        this.setSocialSpent(0);
        this.setSocialUniqueClicks(0);
        this.setSocialUniqueImpressions(0);
        this.setSpent(0);
        this.setStartTime(0L);
        this.setUniqueClicks(0);
        this.setUniqueImpressions(0);
        this.setVideoId(0L);
        this.setPublishBatchId(-1L);
        this.setDeleteStatus(0);
        this.setCreateTime(0L);
    }

}
